package com.sicong.common.core.enums;

import lombok.Getter;

/**
 * 返回状态码
 *
 * @author Chenww
 * @since 2020-09-18
 */
@Getter
public enum ResultEnum {

    /**
     * 通用
     */
    SUCCESS(200, "成功"),
    ERROR(40000, "错误"),
    UN_AUTH(401, "未登录"),
    NO_ACCESS(403, "无权限"),

    /**
     * 用户认证
     */
    TOKEN_ERROR(40001, "认证失败"),
    ACCOUNT_NOT_EXIST(40002, "账户不存在"),
    ERROR_PASSWORD(40003, "密码错误"),
    ACCOUNT_LOCKED(40004, "帐号已被锁定"),
    IDENTITY_EXPIRED(40005,"账号身份过期，请重新登录");

    private final int code;
    private final String msg;

    ResultEnum(int code, String msg) {
        this.code = code;
        this.msg = msg;
    }

}
